import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/drama_play_entity.dart';

DramaPlayEntity $DramaPlayEntityFromJson(Map<String, dynamic> json) {
  final DramaPlayEntity dramaPlayEntity = DramaPlayEntity();
  final List<int>? dramaId = (json['drama_id'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<int>(e) as int).toList();
  if (dramaId != null) {
    dramaPlayEntity.dramaId = dramaId;
  }
  return dramaPlayEntity;
}

Map<String, dynamic> $DramaPlayEntityToJson(DramaPlayEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['drama_id'] = entity.dramaId;
  return data;
}

extension DramaPlayEntityExtension on DramaPlayEntity {
  DramaPlayEntity copyWith({
    List<int>? dramaId,
  }) {
    return DramaPlayEntity()
      ..dramaId = dramaId ?? this.dramaId;
  }
}